.class public final Ldgb/n;
.super Ljava/lang/Object;
.source "SourceFile"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Ldgb/n$b;
    }
.end annotation


# static fields
.field private static final i:Ljava/lang/Long;


# instance fields
.field private a:Ldgb/s;

.field private final b:Ldgb/r;

.field private final c:Ldgb/q;

.field private final d:Ldgb/p;

.field private final e:Landroid/content/Context;

.field private f:Ljava/lang/Runnable;

.field private g:Ljava/util/Queue;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Queue<",
            "Ldgb/k;",
            ">;"
        }
    .end annotation
.end field

.field private h:Ljava/util/Map;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Map<",
            "Ldgb/n$b;",
            "Ljava/lang/Boolean;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 2

    const-wide/16 v0, 0x2710

    .line 1
    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object v0

    sput-object v0, Ldgb/n;->i:Ljava/lang/Long;

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 2

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    new-instance v0, Ldgb/n$a;

    invoke-direct {v0, p0}, Ldgb/n$a;-><init>(Ldgb/n;)V

    iput-object v0, p0, Ldgb/n;->f:Ljava/lang/Runnable;

    .line 3
    new-instance v0, Ljava/util/LinkedList;

    invoke-direct {v0}, Ljava/util/LinkedList;-><init>()V

    iput-object v0, p0, Ldgb/n;->g:Ljava/util/Queue;

    .line 4
    new-instance v0, Ljava/util/LinkedHashMap;

    invoke-direct {v0}, Ljava/util/LinkedHashMap;-><init>()V

    iput-object v0, p0, Ldgb/n;->h:Ljava/util/Map;

    .line 5
    iput-object p1, p0, Ldgb/n;->e:Landroid/content/Context;

    .line 6
    new-instance v0, Ldgb/r;

    invoke-direct {v0, p1}, Ldgb/r;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Ldgb/n;->b:Ldgb/r;

    .line 7
    new-instance p1, Ldgb/q;

    iget-object v0, p0, Ldgb/n;->e:Landroid/content/Context;

    invoke-direct {p1, v0}, Ldgb/q;-><init>(Landroid/content/Context;)V

    iput-object p1, p0, Ldgb/n;->c:Ldgb/q;

    .line 8
    new-instance p1, Ldgb/p;

    iget-object v0, p0, Ldgb/n;->e:Landroid/content/Context;

    const-string v1, "sk"

    invoke-direct {p1, v0, v1}, Ldgb/p;-><init>(Landroid/content/Context;Ljava/lang/String;)V

    iput-object p1, p0, Ldgb/n;->d:Ldgb/p;

    return-void
.end method

.method private a(Ljava/lang/Number;Ljava/lang/Number;)Ljava/lang/Number;
    .locals 2

    if-nez p2, :cond_0

    const/4 p1, 0x0

    return-object p1

    .line 107
    :cond_0
    instance-of v0, p1, Ljava/lang/Byte;

    if-eqz v0, :cond_1

    .line 108
    invoke-virtual {p1}, Ljava/lang/Number;->byteValue()B

    move-result p1

    invoke-virtual {p2}, Ljava/lang/Number;->byteValue()B

    move-result p2

    add-int/2addr p1, p2

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    return-object p1

    .line 109
    :cond_1
    instance-of v0, p1, Ljava/lang/Short;

    if-eqz v0, :cond_2

    .line 110
    invoke-virtual {p1}, Ljava/lang/Number;->intValue()I

    move-result p1

    invoke-virtual {p2}, Ljava/lang/Number;->intValue()I

    move-result p2

    add-int/2addr p1, p2

    invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p1

    return-object p1

    .line 111
    :cond_2
    instance-of v0, p1, Ljava/lang/Integer;

    if-eqz v0, :cond_3

    .line 112
    invoke-virtual {p1}, Ljava/lang/Number;->longValue()J

    move-result-wide v0

    invoke-virtual {p2}, Ljava/lang/Number;->longValue()J

    move-result-wide p1

    add-long/2addr v0, p1

    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object p1

    return-object p1

    .line 113
    :cond_3
    instance-of v0, p1, Ljava/lang/Long;

    if-eqz v0, :cond_4

    .line 114
    invoke-virtual {p1}, Ljava/lang/Number;->longValue()J

    move-result-wide v0

    invoke-virtual {p2}, Ljava/lang/Number;->longValue()J

    move-result-wide p1

    add-long/2addr v0, p1

    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object p1

    return-object p1

    .line 115
    :cond_4
    instance-of v0, p1, Ljava/lang/Float;

    if-eqz v0, :cond_5

    .line 116
    invoke-virtual {p1}, Ljava/lang/Number;->doubleValue()D

    move-result-wide v0

    invoke-virtual {p2}, Ljava/lang/Number;->doubleValue()D

    move-result-wide p1

    add-double/2addr v0, p1

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object p1

    return-object p1

    .line 117
    :cond_5
    instance-of v0, p1, Ljava/lang/Double;

    if-eqz v0, :cond_6

    .line 118
    invoke-virtual {p1}, Ljava/lang/Number;->doubleValue()D

    move-result-wide v0

    invoke-virtual {p2}, Ljava/lang/Number;->doubleValue()D

    move-result-wide p1

    add-double/2addr v0, p1

    invoke-static {v0, v1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object p1

    return-object p1

    .line 119
    :cond_6
    instance-of v0, p1, Ljava/math/BigInteger;

    if-eqz v0, :cond_7

    .line 120
    check-cast p1, Ljava/math/BigInteger;

    check-cast p2, Ljava/math/BigInteger;

    invoke-virtual {p1, p2}, Ljava/math/BigInteger;->add(Ljava/math/BigInteger;)Ljava/math/BigInteger;

    move-result-object p1

    return-object p1

    .line 121
    :cond_7
    instance-of v0, p1, Ljava/math/BigDecimal;

    if-eqz v0, :cond_8

    .line 122
    check-cast p1, Ljava/math/BigDecimal;

    check-cast p2, Ljava/math/BigDecimal;

    invoke-virtual {p1, p2}, Ljava/math/BigDecimal;->add(Ljava/math/BigDecimal;)Ljava/math/BigDecimal;

    move-result-object p1

    :cond_8
    return-object p1
.end method

.method private static a(ILjava/lang/String;)Ljava/lang/Object;
    .locals 1
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Lorg/json/JSONException;
        }
    .end annotation

    const/16 v0, 0xa

    if-ne v0, p0, :cond_0

    .line 95
    invoke-virtual {p1}, Ljava/lang/String;->getBytes()[B

    move-result-object p0

    return-object p0

    :cond_0
    const/16 v0, 0x9

    if-ne v0, p0, :cond_1

    .line 96
    new-instance p0, Lorg/json/JSONObject;

    invoke-direct {p0, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    return-object p0

    :cond_1
    if-nez p0, :cond_2

    .line 97
    invoke-static {p1}, Ljava/lang/Byte;->parseByte(Ljava/lang/String;)B

    move-result p0

    invoke-static {p0}, Ljava/lang/Byte;->valueOf(B)Ljava/lang/Byte;

    move-result-object p0

    return-object p0

    :cond_2
    const/4 v0, 0x1

    if-ne v0, p0, :cond_3

    .line 98
    invoke-static {p1}, Ljava/lang/Short;->parseShort(Ljava/lang/String;)S

    move-result p0

    invoke-static {p0}, Ljava/lang/Short;->valueOf(S)Ljava/lang/Short;

    move-result-object p0

    return-object p0

    :cond_3
    const/4 v0, 0x2

    if-ne v0, p0, :cond_4

    .line 99
    invoke-static {p1}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result p0

    invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object p0

    return-object p0

    :cond_4
    const/4 v0, 0x3

    if-ne v0, p0, :cond_5

    .line 100
    invoke-static {p1}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J

    move-result-wide p0

    invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object p0

    return-object p0

    :cond_5
    const/4 v0, 0x4

    if-ne v0, p0, :cond_6

    .line 101
    invoke-static {p1}, Ljava/lang/Float;->parseFloat(Ljava/lang/String;)F

    move-result p0

    invoke-static {p0}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;

    move-result-object p0

    return-object p0

    :cond_6
    const/4 v0, 0x5

    if-ne v0, p0, :cond_7

    .line 102
    invoke-static {p1}, Ljava/lang/Double;->parseDouble(Ljava/lang/String;)D

    move-result-wide p0

    invoke-static {p0, p1}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object p0

    return-object p0

    :cond_7
    const/4 v0, 0x6

    if-ne v0, p0, :cond_8

    .line 103
    new-instance p0, Ljava/math/BigInteger;

    invoke-direct {p0, p1}, Ljava/math/BigInteger;-><init>(Ljava/lang/String;)V

    return-object p0

    :cond_8
    const/4 v0, 0x7

    if-ne v0, p0, :cond_9

    .line 104
    new-instance p0, Ljava/math/BigDecimal;

    invoke-direct {p0, p1}, Ljava/math/BigDecimal;-><init>(Ljava/lang/String;)V

    return-object p0

    :cond_9
    return-object p1
.end method

.method private static a(ILjava/lang/Object;)Ljava/lang/String;
    .locals 1

    const/16 v0, 0xa

    if-ne v0, p0, :cond_0

    .line 105
    new-instance p0, Ljava/lang/String;

    check-cast p1, [B

    invoke-direct {p0, p1}, Ljava/lang/String;-><init>([B)V

    return-object p0

    .line 106
    :cond_0
    invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object p0

    return-object p0
.end method

.method static synthetic a(Ldgb/n;)Ljava/util/Queue;
    .locals 0

    .line 1
    iget-object p0, p0, Ldgb/n;->g:Ljava/util/Queue;

    return-object p0
.end method

.method static synthetic a(Ldgb/n;Ljava/util/Queue;)Ljava/util/Queue;
    .locals 0

    .line 2
    iput-object p1, p0, Ldgb/n;->g:Ljava/util/Queue;

    return-object p1
.end method

.method private a(Ldgb/k;)Z
    .locals 1

    .line 13
    iget-object v0, p0, Ldgb/n;->g:Ljava/util/Queue;

    invoke-interface {v0, p1}, Ljava/util/Queue;->offer(Ljava/lang/Object;)Z

    .line 14
    iget-object p1, p0, Ldgb/n;->f:Ljava/lang/Runnable;

    invoke-static {p1}, Ldgb/b0;->b(Ljava/lang/Runnable;)V

    .line 15
    iget-object p1, p0, Ldgb/n;->f:Ljava/lang/Runnable;

    invoke-static {p1}, Ldgb/b0;->a(Ljava/lang/Runnable;)Z

    move-result p1

    return p1
.end method

.method private a(Ldgb/k;Ljava/lang/String;)Z
    .locals 4

    .line 16
    invoke-direct {p0, p2, p1}, Ldgb/n;->a(Ljava/lang/String;Ldgb/k;)Z

    move-result v0

    const-string v1, "stat.EventDispatcher"

    if-eqz v0, :cond_2

    .line 17
    sget-boolean v2, Ldgb/z;->c:Z

    if-eqz v2, :cond_0

    .line 18
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Push to db "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string v3, " success!"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-static {v1, v2}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    :cond_0
    const-string v1, "d"

    .line 19
    invoke-virtual {v1, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result p2

    if-eqz p2, :cond_1

    .line 20
    iget-object p2, p0, Ldgb/n;->d:Ldgb/p;

    invoke-virtual {p1}, Ldgb/k;->e()Ljava/lang/String;

    move-result-object p1

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v1

    invoke-virtual {p2, p1, v1, v2}, Ldgb/p;->a(Ljava/lang/String;J)V

    .line 21
    :cond_1
    invoke-virtual {p0}, Ldgb/n;->c()Z

    goto :goto_0

    .line 22
    :cond_2
    sget-boolean v2, Ldgb/z;->c:Z

    if-eqz v2, :cond_3

    .line 23
    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Push event:"

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    const-string p1, " to "

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    const-string p1, " db failed!"

    invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object p1

    invoke-static {v1, p1}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I

    :cond_3
    :goto_0
    return v0
.end method

.method static synthetic a(Ldgb/n;Ldgb/k;)Z
    .locals 0

    .line 3
    invoke-direct {p0, p1}, Ldgb/n;->b(Ldgb/k;)Z

    move-result p0

    return p0
.end method

.method private a(Ljava/lang/String;Ldgb/k;)Z
    .locals 17

    move-object/from16 v1, p0

    move-object/from16 v0, p1

    const-string v2, "pkv"

    const-string v3, "pk"

    const/4 v4, 0x0

    .line 24
    :try_start_0
    iget-object v5, v1, Ldgb/n;->e:Landroid/content/Context;

    invoke-static {v5}, Ldgb/l;->a(Landroid/content/Context;)Ljava/lang/String;

    move-result-object v5

    if-nez v5, :cond_0

    return v4

    .line 25
    :cond_0
    invoke-static {}, Ldgb/l;->a()Ljava/lang/String;

    move-result-object v6

    .line 26
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->e()Ljava/lang/String;

    move-result-object v7

    invoke-static {v7, v6}, Ldgb/j;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    .line 27
    invoke-static {v6, v5}, Ldgb/j;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v14

    .line 28
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->d()I

    move-result v7

    const/16 v8, 0x9

    const/4 v10, 0x1

    const/4 v11, 0x0

    if-ne v10, v7, :cond_4

    .line 29
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v7

    if-ne v8, v7, :cond_3

    .line 30
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->g()Ljava/lang/Object;

    move-result-object v7

    if-eqz v7, :cond_1

    .line 31
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->g()Ljava/lang/Object;

    move-result-object v7

    :goto_0
    check-cast v7, Lorg/json/JSONObject;

    goto :goto_1

    :cond_1
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v7

    .line 32
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->h()Ljava/lang/String;

    move-result-object v12

    .line 33
    invoke-static {v7, v12}, Ldgb/n;->a(ILjava/lang/String;)Ljava/lang/Object;

    move-result-object v7

    goto :goto_0

    .line 34
    :goto_1
    new-instance v12, Lorg/json/JSONObject;

    invoke-direct {v12}, Lorg/json/JSONObject;-><init>()V

    .line 35
    invoke-virtual {v7}, Lorg/json/JSONObject;->keys()Ljava/util/Iterator;

    move-result-object v13

    :goto_2
    invoke-interface {v13}, Ljava/util/Iterator;->hasNext()Z

    move-result v15

    if-eqz v15, :cond_2

    .line 36
    invoke-interface {v13}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v15

    check-cast v15, Ljava/lang/String;

    .line 37
    invoke-static {v15, v6}, Ldgb/j;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v7, v15}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v15

    invoke-virtual {v12, v8, v15}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    const/16 v8, 0x9

    goto :goto_2

    :cond_2
    move-object v6, v12

    move-object v12, v11

    goto :goto_4

    :cond_3
    move-object v6, v11

    move-object v12, v6

    goto :goto_4

    :cond_4
    const/4 v7, 0x3

    .line 38
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->d()I

    move-result v8

    if-ne v7, v8, :cond_6

    .line 39
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->g()Ljava/lang/Object;

    move-result-object v6

    if-eqz v6, :cond_5

    .line 40
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v6

    invoke-virtual/range {p2 .. p2}, Ldgb/k;->g()Ljava/lang/Object;

    move-result-object v7

    invoke-static {v6, v7}, Ldgb/n;->a(ILjava/lang/Object;)Ljava/lang/String;

    move-result-object v6

    goto :goto_3

    .line 41
    :cond_5
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->h()Ljava/lang/String;

    move-result-object v6

    :goto_3
    move-object v12, v6

    move-object v6, v11

    goto :goto_4

    .line 42
    :cond_6
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->g()Ljava/lang/Object;

    move-result-object v7

    if-eqz v7, :cond_7

    .line 43
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v7

    invoke-virtual/range {p2 .. p2}, Ldgb/k;->g()Ljava/lang/Object;

    move-result-object v8

    invoke-static {v7, v8}, Ldgb/n;->a(ILjava/lang/Object;)Ljava/lang/String;

    move-result-object v7

    .line 44
    invoke-static {v7, v6}, Ldgb/j;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    goto :goto_3

    .line 45
    :cond_7
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->h()Ljava/lang/String;

    move-result-object v7

    invoke-static {v7, v6}, Ldgb/j;->b(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v6

    goto :goto_3

    .line 46
    :goto_4
    iget-object v7, v1, Ldgb/n;->b:Ldgb/r;

    invoke-virtual {v7, v0}, Ldgb/r;->a(Ljava/lang/String;)Ldgb/m;

    move-result-object v7

    .line 47
    iget-object v8, v1, Ldgb/n;->e:Landroid/content/Context;

    invoke-virtual {v8, v0, v4}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 48
    invoke-interface {v0, v3, v11}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    .line 49
    invoke-interface {v0, v2, v4}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I

    move-result v11

    .line 50
    invoke-virtual {v7}, Ldgb/m;->a()V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    if-eqz v8, :cond_8

    .line 51
    :try_start_1
    invoke-virtual {v8, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v13

    if-nez v13, :cond_8

    .line 52
    invoke-virtual {v7, v11}, Ldgb/m;->a(I)V

    goto :goto_5

    :catchall_0
    move-exception v0

    goto/16 :goto_f

    :cond_8
    :goto_5
    if-eqz v8, :cond_a

    .line 53
    invoke-virtual {v8, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v8

    if-nez v8, :cond_9

    goto :goto_7

    :cond_9
    :goto_6
    move v15, v11

    goto :goto_8

    .line 54
    :cond_a
    :goto_7
    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v0

    .line 55
    invoke-interface {v0, v3, v5}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;

    add-int/lit8 v11, v11, 0x1

    .line 56
    invoke-interface {v0, v2, v11}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    .line 57
    invoke-interface {v0}, Landroid/content/SharedPreferences$Editor;->commit()Z

    goto :goto_6

    .line 58
    :goto_8
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->d()I

    move-result v0

    if-ne v10, v0, :cond_12

    .line 59
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->i()Ljava/util/Date;

    move-result-object v0

    invoke-virtual {v7, v9, v0, v14}, Ldgb/m;->a(Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_f

    .line 60
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v2

    const/16 v3, 0x9

    if-ne v3, v2, :cond_d

    .line 61
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v2

    invoke-static {v2, v0}, Ldgb/n;->a(ILjava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lorg/json/JSONObject;

    .line 62
    invoke-virtual {v6}, Lorg/json/JSONObject;->keys()Ljava/util/Iterator;

    move-result-object v2

    :goto_9
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_c

    .line 63
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/String;

    .line 64
    invoke-virtual {v6, v3}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/Number;

    .line 65
    invoke-virtual {v0, v3}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v8

    if-eqz v8, :cond_b

    .line 66
    invoke-virtual {v0, v3}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v8

    check-cast v8, Ljava/lang/Number;

    invoke-direct {v1, v8, v5}, Ldgb/n;->a(Ljava/lang/Number;Ljava/lang/Number;)Ljava/lang/Number;

    move-result-object v5

    invoke-virtual {v0, v3, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    goto :goto_9

    .line 67
    :cond_b
    invoke-virtual {v0, v3, v5}, Lorg/json/JSONObject;->put(Ljava/lang/String;Ljava/lang/Object;)Lorg/json/JSONObject;

    goto :goto_9

    .line 68
    :cond_c
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v2

    invoke-static {v2, v0}, Ldgb/n;->a(ILjava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    goto :goto_c

    .line 69
    :cond_d
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v2

    invoke-static {v2, v0}, Ldgb/n;->a(ILjava/lang/String;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Number;

    .line 70
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->g()Ljava/lang/Object;

    move-result-object v2

    if-eqz v2, :cond_e

    .line 71
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->g()Ljava/lang/Object;

    move-result-object v2

    :goto_a
    check-cast v2, Ljava/lang/Number;

    goto :goto_b

    :cond_e
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v2

    .line 72
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->h()Ljava/lang/String;

    move-result-object v3

    .line 73
    invoke-static {v2, v3}, Ldgb/n;->a(ILjava/lang/String;)Ljava/lang/Object;

    move-result-object v2

    goto :goto_a

    .line 74
    :goto_b
    invoke-direct {v1, v0, v2}, Ldgb/n;->a(Ljava/lang/Number;Ljava/lang/Number;)Ljava/lang/Number;

    move-result-object v0

    .line 75
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v2

    invoke-static {v2, v0}, Ldgb/n;->a(ILjava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    .line 76
    :goto_c
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->i()Ljava/util/Date;

    move-result-object v2

    invoke-virtual {v7, v9, v0, v2, v14}, Ldgb/m;->a(Ljava/lang/String;Ljava/lang/String;Ljava/util/Date;Ljava/lang/String;)Z

    move-result v0
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 77
    :try_start_2
    invoke-virtual {v7}, Ldgb/m;->b()V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    return v0

    .line 78
    :cond_f
    :try_start_3
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v0

    const/16 v2, 0x9

    if-ne v2, v0, :cond_10

    .line 79
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v0

    invoke-static {v0, v6}, Ldgb/n;->a(ILjava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    :goto_d
    move-object v12, v0

    goto :goto_e

    .line 80
    :cond_10
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->h()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_11

    .line 81
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->h()Ljava/lang/String;

    move-result-object v0

    goto :goto_d

    :cond_11
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v0

    .line 82
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->g()Ljava/lang/Object;

    move-result-object v2

    .line 83
    invoke-static {v0, v2}, Ldgb/n;->a(ILjava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    goto :goto_d

    .line 84
    :goto_e
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v10

    invoke-virtual/range {p2 .. p2}, Ldgb/k;->d()I

    move-result v11

    .line 85
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->i()Ljava/util/Date;

    move-result-object v13

    .line 86
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->f()I

    move-result v16

    move-object v8, v7

    .line 87
    invoke-virtual/range {v8 .. v16}, Ldgb/m;->a(Ljava/lang/String;IILjava/lang/String;Ljava/util/Date;Ljava/lang/String;II)Z

    move-result v0
    :try_end_3
    .catchall {:try_start_3 .. :try_end_3} :catchall_0

    .line 88
    :try_start_4
    invoke-virtual {v7}, Ldgb/m;->b()V
    :try_end_4
    .catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_0

    return v0

    .line 89
    :cond_12
    :try_start_5
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->c()I

    move-result v10

    invoke-virtual/range {p2 .. p2}, Ldgb/k;->d()I

    move-result v11

    .line 90
    invoke-virtual/range {p2 .. p2}, Ldgb/k;->i()Ljava/util/Date;

    move-result-object v13

    invoke-virtual/range {p2 .. p2}, Ldgb/k;->f()I

    move-result v16

    move-object v8, v7

    .line 91
    invoke-virtual/range {v8 .. v16}, Ldgb/m;->a(Ljava/lang/String;IILjava/lang/String;Ljava/util/Date;Ljava/lang/String;II)Z

    move-result v0
    :try_end_5
    .catchall {:try_start_5 .. :try_end_5} :catchall_0

    .line 92
    :try_start_6
    invoke-virtual {v7}, Ldgb/m;->b()V

    return v0

    :goto_f
    invoke-virtual {v7}, Ldgb/m;->b()V

    throw v0
    :try_end_6
    .catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_0

    :catch_0
    move-exception v0

    .line 93
    sget-boolean v2, Ldgb/z;->d:Z

    if-eqz v2, :cond_13

    const-string v2, "stat.EventDispatcher"

    const-string v3, "Failed to push the event."

    .line 94
    invoke-static {v2, v3, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    :cond_13
    return v4
.end method

.method static synthetic b(Ldgb/n;)Ldgb/q;
    .locals 0

    .line 1
    iget-object p0, p0, Ldgb/n;->c:Ldgb/q;

    return-object p0
.end method

.method private b(Ldgb/k;)Z
    .locals 3

    .line 6
    sget-boolean v0, Ldgb/z;->b:Z

    if-eqz v0, :cond_0

    .line 7
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "HandleEvent :"

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {p1}, Ldgb/k;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "stat.EventDispatcher"

    invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 8
    :cond_0
    invoke-virtual {p1}, Ldgb/k;->b()I

    move-result v0

    const-string v1, "i"

    if-nez v0, :cond_2

    .line 9
    iget-object v0, p0, Ldgb/n;->d:Ldgb/p;

    invoke-virtual {p1}, Ldgb/k;->e()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v0, v2}, Ldgb/p;->a(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_1

    .line 10
    invoke-virtual {p1}, Ldgb/k;->f()I

    move-result v0

    add-int/lit8 v0, v0, 0x3

    .line 11
    invoke-virtual {p1, v0}, Ldgb/k;->b(I)V

    .line 12
    invoke-direct {p0, p1, v1}, Ldgb/n;->a(Ldgb/k;Ljava/lang/String;)Z

    move-result p1

    return p1

    :cond_1
    const-string v0, "d"

    .line 13
    invoke-direct {p0, p1, v0}, Ldgb/n;->a(Ldgb/k;Ljava/lang/String;)Z

    move-result p1

    return p1

    :cond_2
    const/4 v0, 0x1

    .line 14
    invoke-virtual {p1}, Ldgb/k;->b()I

    move-result v2

    if-ne v0, v2, :cond_3

    .line 15
    invoke-direct {p0, p1, v1}, Ldgb/n;->a(Ldgb/k;Ljava/lang/String;)Z

    move-result p1

    return p1

    :cond_3
    const/4 p1, 0x0

    return p1
.end method

.method static synthetic c(Ldgb/n;)Ljava/util/Map;
    .locals 0

    .line 1
    iget-object p0, p0, Ldgb/n;->h:Ljava/util/Map;

    return-object p0
.end method

.method static synthetic d()Ljava/lang/Long;
    .locals 1

    .line 1
    sget-object v0, Ldgb/n;->i:Ljava/lang/Long;

    return-object v0
.end method


# virtual methods
.method public a()V
    .locals 2

    .line 4
    sget-boolean v0, Ldgb/z;->b:Z

    if-eqz v0, :cond_0

    const-string v0, "stat.EventDispatcher"

    const-string v1, "Start!"

    .line 5
    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    :cond_0
    return-void
.end method

.method public a(Ldgb/k;Z)Z
    .locals 2

    .line 6
    sget-boolean v0, Ldgb/z;->b:Z

    if-eqz v0, :cond_0

    .line 7
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, "DispatchEvent:event="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    const-string v1, "stat.EventDispatcher"

    invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 8
    :cond_0
    iget-object v0, p0, Ldgb/n;->a:Ldgb/s;

    if-nez v0, :cond_1

    .line 9
    new-instance v0, Ldgb/s;

    iget-object v1, p0, Ldgb/n;->e:Landroid/content/Context;

    invoke-direct {v0, v1}, Ldgb/s;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Ldgb/n;->a:Ldgb/s;

    .line 10
    invoke-virtual {v0}, Ldgb/s;->a()V

    :cond_1
    if-eqz p2, :cond_2

    .line 11
    invoke-direct {p0, p1}, Ldgb/n;->a(Ldgb/k;)Z

    move-result p1

    return p1

    .line 12
    :cond_2
    invoke-direct {p0, p1}, Ldgb/n;->b(Ldgb/k;)Z

    move-result p1

    return p1
.end method

.method public b()V
    .locals 2

    .line 2
    sget-boolean v0, Ldgb/z;->b:Z

    if-eqz v0, :cond_0

    const-string v0, "stat.EventDispatcher"

    const-string v1, "Shutdown!"

    .line 3
    invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 4
    :cond_0
    iget-object v0, p0, Ldgb/n;->a:Ldgb/s;

    if-eqz v0, :cond_1

    .line 5
    invoke-virtual {v0}, Ldgb/s;->b()V

    :cond_1
    return-void
.end method

.method public c()Z
    .locals 3

    .line 2
    iget-object v0, p0, Ldgb/n;->h:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->keySet()Ljava/util/Set;

    move-result-object v0

    .line 3
    invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;

    move-result-object v0

    .line 4
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z

    move-result v1

    if-eqz v1, :cond_0

    .line 5
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Ljava/lang/Runnable;

    invoke-static {v1}, Ldgb/b0;->b(Ljava/lang/Runnable;)V

    goto :goto_0

    .line 6
    :cond_0
    iget-object v0, p0, Ldgb/n;->h:Ljava/util/Map;

    invoke-interface {v0}, Ljava/util/Map;->clear()V

    .line 7
    new-instance v0, Ldgb/n$b;

    const/4 v1, 0x0

    invoke-direct {v0, p0, v1}, Ldgb/n$b;-><init>(Ldgb/n;Ldgb/n$a;)V

    .line 8
    iget-object v1, p0, Ldgb/n;->h:Ljava/util/Map;

    const/4 v2, 0x1

    invoke-static {v2}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v2

    invoke-interface {v1, v0, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    const-wide/16 v1, 0x64

    .line 9
    invoke-static {v0, v1, v2}, Ldgb/b0;->a(Ljava/lang/Runnable;J)Z

    move-result v0

    return v0
.end method
